package cc.vv.btpartyjob.partymanager.delegate

import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.btpartyjob.partymanager.inter.OperationItemClickInterface
import cc.vv.btpartyjob.partymanager.moudel.bean.OperationBean
import cc.vv.btpartyjob.partymanager.view.EnterPriseOperationView
import cc.vv.mvp.delegate.BaseAppDelegate
import java.util.ArrayList

/**
 * 网格详情托管类
 * Created by Chen.qi on 2018/10/24.
 */
class WangGeDetailActivityDelegate : BaseAppDelegate() {


    override fun initWidget() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_wangge_detial
    }

    /**设置标题title*/
    fun setTopBarTitle(topBarTitle: String) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_wgd_topBar)
        titleBar?.setTitle(topBarTitle)
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_wgd_topBar)
        titleBar?.setEventInterface(event)
    }

    /**
     * 网格详情设置楼栋党小组
     */
    fun setLouDongTeamData(optionList: ArrayList<OperationBean>?, itemClickCallBack: OperationItemClickInterface?) {
        getView<EnterPriseOperationView>(R.id.ov_wgd_ldTeam)?.addAllSelectedFileView(optionList, 4, itemClickCallBack)
    }


}